// app.ts
const baseURL = 'https://api.mofun365.com:8888/api/goods/'
App<IAppOption>({
  globalData: {
    'baseURL': baseURL
  },
  onLaunch() {
    wx.cloud.init({
      env: 'learn-wx-3g8w4e1eeb1dc047',// 个人账号对应的云环境ID
    })
    // 登录
    wx.login({
      success: res => {
        console.log('wx.login', res.code)
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      },
    })
    wx.showTabBarRedDot({
      index: 1
    })
    wx.setTabBarBadge({
      index: 2,
      text: '3'
    })
  },
})